import service from '@/utils/crmRequest'

export default () => ({
  APPROVAL_SUBMIT: (data) => {
    return service({
      url: '/api/workFlow/approval',
      method: 'post',
      data
    })
  },

  // 获取form
  APPROVAL_FORM: (data) => {
    return service({
      url: '/api/workFlow/submitForm',
      method: 'post',
      donNotShowLoading: true,
      data
    })
  },

  // 审批详情判断审批等按钮显示隐藏
  APPROVAL_BTN_SHOW: (params) => {
    return service({
      url: 'api/workFlow/allow',
      method: 'get',
      params
    })
  },

  // 获取审批结论列表
  APPROVAL_RESULT_LIST: (params) => {
    return service({
      url: '/api/workFlow/buttons',
      method: 'get',
      donNotShowLoading: true,
      params
    })
  },

})
